Charged particle beam devices for irradiating a sample with a charged particle beam, such as electron beam or ion beam, to obtain a signal of secondary charge particles, such as generated secondary electrons, are used for observation and local composition analysis of samples with fine structure or fine shape. Of the charged particle beam devices, a scanning electron microscope that uses an electron beam as a charged particle beam is applied to processes such as dimension measurement and defect inspection, due to its high resolution. Electron beam irradiation during observation by the scanning electron microscope causes mainly hydrocarbon-based contamination, which is present in the atmosphere of the sample chamber, to adhere to the sample. If contamination adheres to the sample, information that the sample originally has, namely, information such as sample composition information and sample shape changes, causing an error in the results in dimension measurement accuracy and composition analysis of fine structure such as semiconductor.
In order to avoid the influence of contamination, Patent Literature 1 describes a dimension measuring device and method for preventing the degradation of dimension measurement accuracy due to phenomena such as contamination associated with changes in potential on the sample surface due to electron beam irradiation, by estimating the potential change region due to the electron beam irradiation during observation based on the information of the observation sample stored in advance in a database, and by selecting the measurement region.